package com.ctgu.service.impl;

import com.ctgu.mapper.TeacherMapper;
import com.ctgu.service.TeacherService;
import com.ctgu.vo.Teacher;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class TeacherServiceImpl implements TeacherService {
    @Resource
    TeacherMapper teacherMapper;

    @Override
    public int updateName(Integer id, String name) {
        Teacher teacher = new Teacher();
        teacher.setTeacherId(id);
        teacher.setTeacherName(name);
        return teacherMapper.updateByPrimaryKeySelective(teacher);
    }
}
